package com.hxd.otc.module.my.bean;

import com.hxd.otc.common.enums.NoticeType;

import java.io.Serializable;

public class NoticeBean implements Serializable {
    private String noticeTypeId;//消息类型 1消息，2.通知，3.公告 ,

    private String title;//消息标题
    private String id;//用户id
    private String content;//内容
    private int isLook;//1已查看，0未查看
    private String url;//外部链接
    private String pictureUrl;//图片链接
    private String createTime;//创建时间

    public String getPictureUrl() {
        return pictureUrl;
    }

    public void setPictureUrl(String pictureUrl) {
        this.pictureUrl = pictureUrl;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }


    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }


    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }


    public int getIsLook() {
        return isLook;
    }

    public boolean isLook() {
        return isLook == 1;
    }

    public void setLook(boolean isLook) {
        this.isLook = isLook ? 1 : 0;
    }

    public void setIsLook(int isLook) {
        this.isLook = isLook;
    }

    public String getNoticeTypeId() {
        return noticeTypeId;
    }

    public void setNoticeTypeId(String noticeTypeId) {
        this.noticeTypeId = noticeTypeId;
    }

    public NoticeType getNoticeType() {
        return NoticeType.getInstance(noticeTypeId);
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        NoticeBean that = (NoticeBean) o;

        return id != null ? id.equals(that.id) : that.id == null;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

    @Override
    public String toString() {
        return "NoticeBean{" +
                "noticeTypeId='" + noticeTypeId + '\'' +
                ", title='" + title + '\'' +
                ", id='" + id + '\'' +
                ", content='" + content + '\'' +
                ", isLook=" + isLook +
                ", url='" + url + '\'' +
                ", pictureUrl='" + pictureUrl + '\'' +
                '}';
    }
}
